package com.harlan.viewbindingstudy.kotlin

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.harlan.viewbindingstudy.R
import com.harlan.viewbindingstudy.databinding.FragmentBranchBinding


/**
 * A simple [Fragment] subclass.
 * Use the [BranchFragment.newInstance] factory method to
 * create an instance of this fragment.
 */
class BranchFragment : Fragment() {
    /**
     * step 1:新建一个branch分支
     * step 2:在分支上添加代码
     * step 3,提交分支，就会在git看到分支
     * step 4 切换到主分支上，选择要合并的分支merge
     * step 5 在主分支上提交你分支的代码
     * */

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

    }

    lateinit var binding: FragmentBranchBinding
    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        // Inflate the layout for this fragment
        binding = FragmentBranchBinding.inflate(inflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        binding.useBranch.setText("测试分支使用")
    }


}